﻿@{
    ViewData["Title"] = "备料选择";
}
	<form id="myFormId" action="/mes/workOrder/saveGenerateIngredients" method="post" target="frmright">
	<div class="box1" id="formContent" whiteBg="true">
	<table class="tableStyle" formMode="transparent">
       @* <input type="hidden" name="editType" value="@ViewData["editType"]" />*@
		<input type="hidden" name="orderNos" value="@ViewData["orderNos"]" />
		
        <tr>
			<td>备料选择：</td>
			<td>
                 <select  url="/mes/WorkOrder/GetPrepareMateria" name="prepareMaterial" id="prepareMaterial"> </select>
                   <span class="star">*</span>
@*				<select name="prepareMaterial"  data='{"list":[{"value":"一步伐","key":"一步伐"},{"value":"一步伐","key":"二步伐"}]}'></select>*@
                
			</td>
		</tr>

		<tr>
			<td class="style2">
                    仓库:
                </td>
                <td class="style3" >
                    <select prompt="全部" url="/mes/WorkOrder/GetWarehouse" name="Warehouse" id="Warehouse"> </select>
                </td>
		</tr>
		
		
		
		<tr>
			<td colspan="2">
				<input type="button" value="提交" onclick="submitForm()"/>
				<input type="button" value="取消" onclick="top.Dialog.close()"/>
			</td>
		</tr>
	</table>
	</div>
	</form>
<!-- 异步提交start -->
<script type="text/javascript">
    function submitForm() {
        var valid = $('#myFormId').validationEngine({ returnIsValid: true });
        if (valid) {
            $('#myFormId').ajaxSubmit({
                //表单提交成功后的回调
                success: function (responseText, statusText, xhr, $form) {
                    top.Dialog.alert(responseText.message, function () {
                        if (responseText.flag == "OK") {
                            closeWin();
                        }
                    });
                }
            });
        } else {
            top.Dialog.alert("数据校验失败，请检查！", function () {
            });
        }
    }

    //重置
    function closeWin() {
        //刷新数据
        ﻿﻿var tabfrmId = "page_" + top.frmright.getCurrentTabId();
        top.frmright .document.getElementById(tabfrmId).contentWindow.refresh(false);
        //关闭窗口
        top.Dialog.close();


      
    }
</script>
<!-- 异步提交end -->	